package comframe.jdbc.sql.support;

import java.sql.SQLException;
import java.util.List;

import comframe.jdbc.sql.support.struct.RM;

/**
 * sql 执行方法
 * @author ray
 *
 */
public interface IEx {

	  /**初始化
	 * @throws SQLException **/
		public void init() throws Exception;
		/**销毁**/
		public void destory() throws Exception;
		
		/**销毁
		 * @throws SQLException **/
		public void commit() throws Exception;
		/**撤销
		 * @throws SQLException **/
		public void rollback() throws Exception;
		/**插入*/
		public boolean insert(RM rm) throws Exception;
		/**插入*/
		public boolean insertBatch(List<RM> rms) throws Exception;
		/**查询*/
		public List<Object> find(RM rm) throws Exception;
		/**删除**/
		public boolean delete(RM rm)throws Exception;
		/**查询总数
		 * @throws SQLException */
		public Integer count(RM rm) throws Exception;
		/**分页查询*/
		public List<Object> pageQuery(RM rm) throws Exception;
		/**更新*/
		public boolean update(RM rm)throws Exception;
		
		
}
